<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul id="list"></ul>

    <script>
        const start =Date.now()
        const listData =new Array(10000).fill(0).map((item,index)=>{
            return {
                id:index,
                name:`name${index}`
            }
        })
        const list = document.getElementById('list')
        listData.forEach(item=>{
            const li = document.createElement('li')
            li.innerHTML = item.name
            list.appendChild(li)
        })
        console.log('js渲染时间',Date.now()-start);
        setTimeout(()=>{
            console.log('dom渲染时间',Date.now()-start);
        },0)



    </script>
</body>
</html>